<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:ui="http://java.sun.com/jsf/facelets"

      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <body>
        <ui:composition>
            <div id="topleftbar">
                <h:link outcome="/faces/user/home.xhtml"> 
                    <h:graphicImage id="top-bar-logo" value="/resources/img/smalllogo.png"/> 
                </h:link> 

                <div id="searchBoxDiv">
                    <div id="searchBoxCenterer">
                        <h:form>
                            <p:autoComplete value="#{searchBean.res}" var="res" itemLabel="#{res.title}" 
                                            completeMethod="#{searchBean.complete}" itemValue="val" 
                                            converter="searchResultConverter" maxResults="5" 
                                            groupBy="#{res.group}">
                                
                                <p:column>
                                    
                                </p:column>
                                
                                <p:column>
                                    <h:link outcome="#{res.pageLink}" value="#{res.title}">
                                        <f:param name="id" value="#{res.prime}"/>
                                    </h:link>
                                </p:column>
                                
                                    
                            </p:autoComplete>
                            <h:commandButton styleClass="searchbutton" action="#" value=" "/>
                        </h:form>
                    </div>    
                </div>    
            </div>

            <div id="userBar">
                <h:form styleClass="ButtonNotificationsForm">
                    <h:outputLabel id="countLabel" class="count" value="#{notificationBean.unReadSeenNotificationNumber}" rendered="#{notificationBean.thereNotificationUnReadSeen?true:false}" />
                    <p:menuButton id="notificationMenu"  value="#{notificationBean.updateUnReadSeen()}"  styleClass="ButtonNotifications" model="#{notificationBean.model}" >
                    </p:menuButton>
                </h:form>    
                <h:graphicImage value="#{userBean.profilePhoto}" id="userPhotoBar"/>
                <p:link id="userBarNameButton" outcome="/user/UserProfile.xhtml" value="#{userBean.name} #{userBean.surname}">
                    <f:param name="id" value="#{userBean.email}"/>
                </p:link>
                <p:link styleClass="userBarLogoutButton" outcome="/user/logout.xhtml" value="Logout"/>

            </div>

        </ui:composition>
        <div class="icon">
            <span class="count">12</span>

        </div>  
    </body>
</html>


